/**
 * Author: Dmitry Ustimov
 * Date: 5/31/13
 * Time: 8:33 PM
 */

package com.gmail.dmitryustimov.ms.java7.mediator.mod.work.demo.col2event1;

public class Demo {

    private static final int NUM_UPDATES = 1;

    public static void main(String[] args) {

        Mediator mediator = new Mediator("Mediator");

        AbstractColleague c1 = new ConcreteColleague1("ConcreteColleague1", mediator);
        AbstractColleague c2 = new ConcreteColleague2("ConcreteColleague2", mediator);

        mediator.addColleague(c1);
        mediator.addColleague(c2);

        for (long j = 0; j < NUM_UPDATES; j++) {
            c1.makeEvent();
            c2.makeEvent();
        }
    }
}
